package com.alibaba.dubbo.remoting.interceptor;

import java.net.InetAddress;
import java.util.Map;

import com.alibaba.dubbo.remoting.Interceptor;
import com.alibaba.dubbo.remoting.RemoteCalling;

public class ConsoleOutputInterceptor implements Interceptor {

	@Override
	public boolean acceptAfterConnected(InetAddress remoteAddress) {
		System.out.println("acceptAfterConnected");
		return true;
	}

	@Override
	public boolean acceptAfterHead(InetAddress remoteAddress, int total, int body) {
		System.out.println("acceptAfterHead");
		return true;
	}

	@Override
	public boolean acceptAfterDecodeHeader(InetAddress remoteAddress,
			Map<String, String> headers, int data) {
		System.out.println("acceptAfterDecodeHeader");
		return true;
	}

	@Override
	public boolean acceptAfterDecodeBody(InetAddress remoteAddress,
			Map<String, String> headers, RemoteCalling calling) {
		System.out.println("acceptAfterDecodeBody");
		return true;
	}

	@Override
	public boolean acceptBeforeEncodeBody(InetAddress remoteAddress,
			Map<String, String> headers) {
		System.out.println("acceptBeforeEncodeBody");
		return true;
	}

	@Override
	public boolean acceptBeforeEncodeHeader(InetAddress remoteAddress,
			Map<String, String> headers) {
		System.out.println("acceptBeforeEncodeHeader");
		return true;
	}

}
